//
//  HD_HSP_FloorImage_ViewController.m
//  HDLiaoNingMeseum
//
//  Created by HDHaoShaoPeng on 2017/8/8.
//  Copyright © 2017年 HDNiuKuiming. All rights reserved.
//

#import "HD_HSP_FloorImage_ViewController.h"
#import "UIView+Extension.h"

@interface HD_HSP_FloorImage_ViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageHeightContraint;
@property (weak, nonatomic) IBOutlet UIImageView *myImage;

@end

static HDDeclare *declare;
@implementation HD_HSP_FloorImage_ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    declare = [HDDeclare sharedDeclare];
    
    NSString *path = [NSString stringWithFormat:@"%@/map/%@_%d.png",declare.catch_path,declare.language.uppercaseString,self.Floor];
    UIImage *image = [UIImage imageWithContentsOfFile:path];
    self.imageHeightContraint.constant = ScreenWidth*image.size.height/image.size.width;
    [self.view layoutIfNeeded];
    self.myImage.image = image;
}


- (IBAction)backClicked:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
